Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iota/transaction-converter

Package Overview
Dependencies
Maintainers
5
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iota/transaction-converter

Converts transaction trytes to transaction objects and back.

  • 1.0.0-beta.cda45022
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by463.8%
Maintainers
5
Weekly downloads
 
Created
Source

@iota/transaction-converter

Methods for calculating transaction hashes and converting transaction objects to transaction trytes and back.

Installation

Install using npm:

npm install @iota/transaction-converter

or using yarn:

yarn add @iota/transaction-converter

API Reference

transaction-converter~asTransactionTrytes(transactions)

ParamTypeDescription
transactionsTransaction | Array.<Transaction>Transaction object(s)

Converts a transaction object or a list of those into transaction trytes.

Returns: Trytes | Array.<Trytes> - Transaction trytes

transaction-converter~asTransactionObject(trytes)

ParamTypeDescription
trytesTrytesTransaction trytes

Converts transaction trytes of 2673 trytes into a transaction object.

Returns: Transaction - Transaction object

transaction-converter~asTransactionObjects([hashes])

ParamTypeDescription
[hashes]Array.<Hash>Optional list of known hashes. Known hashes are directly mapped to transaction objects, otherwise all hashes are being recalculated.

Converts a list of transaction trytes into list of transaction objects. Accepts a list of hashes and returns a mapper. In cases hashes are given, the mapper function map them to converted objects.

Returns: function - transactionObjectsMapper

transaction-converter~transactionObjectsMapper(trytes)

ParamTypeDescription
trytesArray.<Trytes>List of transaction trytes to convert

Maps the list of given hashes to a list of converted transaction objects.

Returns: Array.<Transaction> - List of transaction objects with hashes

Keywords

FAQs

Package last updated on 11 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc